
#include "config.hpp"

#include "atr/list.hpp"

using namespace atr;
using namespace atr::core;

#include "containers/access_test.hpp"
#include "containers/assign_test.hpp"
#include "containers/capacity_test.hpp"
#include "containers/iterators_test.hpp"
#include "containers/modifiers_test.hpp"
#include "containers/operations_test.hpp"

namespace
{
    INSTANTIATE_TYPED_TEST_CASE_P(List, AccessTest, list<>);
    INSTANTIATE_TYPED_TEST_CASE_P(List, AssignTest_Compile, list<>);
    INSTANTIATE_TYPED_TEST_CASE_P(List, CapacityTest, list<>);
    INSTANTIATE_TYPED_TEST_CASE_P(List, IteratorsTest, list<>);
    INSTANTIATE_TYPED_TEST_CASE_P(List, ModifiersTest, list<>);
    INSTANTIATE_TYPED_TEST_CASE_P(List, OperationsTest, list<>);
}

TEST(ListTest, Compile)
{
    list<> l1;                                   UNUSED(l1);
    list<int, char, char, int, long> l2;         UNUSED(l2);
}

TEST(ListTest, Assign_Empty)
{
    using T1 = list<>::assign<>;
    using T2 = list<int, char>::assign<>;

    EXPECT_SAME( list<>, T1 );
    EXPECT_SAME( list<>, T2 );
}

TEST(ListTest,Assign_NonEmpty)
{
    using T1 = list<>::assign<int, char>;
    using T2 = list<int, char>::assign<long, int>;

    using E1 = list<int, char>;
    using E2 = list<long, int>;

    EXPECT_SAME( E1, T1 );
    EXPECT_SAME( E2, T2 );
}